package com.ruoyi.project.qyxy.qua.service.impl;

import java.util.List;

import com.ruoyi.project.qyxy.qua.domain.OrgScoreTest;
import com.ruoyi.project.qyxy.qua.domain.QuaRule;
import com.ruoyi.project.qyxy.qua.mapper.QuaRuleMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.qyxy.qua.mapper.QuaInfoMapper;
import com.ruoyi.project.qyxy.qua.domain.QuaInfo;
import com.ruoyi.project.qyxy.qua.service.IQuaInfoService;

/**
 * 企业资质Service业务层处理
 * 
 * @author lcl
 * @date 2021-03-05
 */
@Service
public class QuaInfoServiceImpl implements IQuaInfoService 
{
    @Autowired
    private QuaInfoMapper quaInfoMapper;

    @Autowired
    private QuaRuleMapper quaRuleMapper;

    /**
     * 查询企业资质
     * 
     * @param orgCode 企业资质ID
     * @return 企业资质
     */
    @Override
    public QuaInfo selectQuaInfoById(String orgCode)
    {
        return quaInfoMapper.selectQuaInfoById(orgCode);
    }

    /**
     * 查询企业资质列表
     * 
     * @param quaInfo 企业资质
     * @return 企业资质
     */
    @Override
    public List<QuaInfo> selectQuaInfoList(QuaInfo quaInfo)
    {
        return quaInfoMapper.selectQuaInfoList(quaInfo);
    }

    /**
     * 新增企业资质
     * 
     * @param quaInfo 企业资质
     * @return 结果
     */
    @Override
    public int insertQuaInfo(QuaInfo quaInfo)
    {
        return quaInfoMapper.insertQuaInfo(quaInfo);
    }

    /**
     * 修改企业资质
     * 
     * @param quaInfo 企业资质
     * @return 结果
     */
    @Override
    public int updateQuaInfo(QuaInfo quaInfo)
    {
        return quaInfoMapper.updateQuaInfo(quaInfo);
    }

    /**
     * 批量删除企业资质
     * 
     * @param orgCodes 需要删除的企业资质ID
     * @return 结果
     */
    @Override
    public int deleteQuaInfoByIds(String[] orgCodes)
    {
        return quaInfoMapper.deleteQuaInfoByIds(orgCodes);
    }

    /**
     * 删除企业资质信息
     * 
     * @param orgCode 企业资质ID
     * @return 结果
     */
    @Override
    public int deleteQuaInfoById(String orgCode)
    {
        return quaInfoMapper.deleteQuaInfoById(orgCode);
    }

    @Override
    public List<QuaRule> selectQuaRuleList() {
        return quaRuleMapper.selectList();
    }

    @Override
    public void insertOrgScoreTest(OrgScoreTest orgScoreTest) {
        quaInfoMapper.insertOrgScoreTest(orgScoreTest);
    }

    @Override
    public List<QuaInfo> selectJlQuaInfoList(QuaInfo quaInfo) {
        return quaInfoMapper.selectJlQuaInfoList(quaInfo);
    }
}
